#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<algorithm>
#include<utility>
using namespace std;
#include"reverse_iterator.h"
#include"priority_queue.h"
#include"list.h"

void priority_queue_test()
{
	wjb::priority_queue<int> pq;
	pq.push(1);
	pq.push(4);
	pq.push(6);
	pq.push(8);
	pq.push(0);
	pq.push(2);

	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << endl;

}


void reverse_iterator_test()
{
	wjb::list<int> lt;
	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);
	lt.push_back(5);
	for (auto e : lt)
	{
		cout << e << " ";
	}
	cout << endl;

	wjb::list<int>::reverse_iterator rit = lt.rbegin();

	while (rit != lt.rend())
	{
		cout << *rit << " ";
		++rit;
	}
	cout << endl;
}


int main()
{
	//priority_queue_test();
	reverse_iterator_test();
	return 0;
}